Fallback Behavior topic

It is possible to specify the behavior if there is no specific information for serializing or deserializing a specific class.

The following classes specify the currently existing behaviors

Classes

GenerateDartClassCodeOnMissingDeserializationInformation Fallback Behavior
Generates dart code representing the passed instance The generated class contains all properties as final properties which allows the class-instances to be const. Additionally a static property phpSerializationObjectInformation is created which can be passed to phpSerialize and phpDeserialize.
GenerateDartClassCodeOnMissingDeserializationInformation Fallback Behavior
Generates dart code representing the passed instance The generated class contains all properties as final properties which allows the class-instances to be const. Additionally a static property phpSerializationObjectInformation is created which can be passed to phpSerialize and phpDeserialize.
GenerateMapOnMissingDeserializationInformation Fallback Behavior
Generates a Map<String, dynamic> for objects that do not have matching PhpSerializationObjectInformation.
GenerateMapOnMissingDeserializationInformation Fallback Behavior
Generates a Map<String, dynamic> for objects that do not have matching PhpSerializationObjectInformation.
NoMatchingObjectDeserializationInformation Fallback Behavior
Implement this interface to customize the action when there is not matching information for deserialization.
NoMatchingObjectDeserializationInformation Fallback Behavior
Implement this interface to customize the action when there is not matching information for deserialization.
NoMatchingObjectSerializationInformation Fallback Behavior
Implement this interface to customize the action when there is not matching information for serialization.
NoMatchingObjectSerializationInformation Fallback Behavior
Implement this interface to customize the action when there is not matching information for serialization.
ThrowExceptionOnMissingDeserializationInformation Fallback Behavior
Throws an exception of type DeserializationException if there is no matching PhpSerializationObjectInformation for a class.
ThrowExceptionOnMissingDeserializationInformation Fallback Behavior
Throws an exception of type DeserializationException if there is no matching PhpSerializationObjectInformation for a class.
ThrowExceptionOnMissingSerializationInformation Fallback Behavior
Throws an exception of type SerializationException if there is no matching PhpSerializationObjectInformation for a class.
ThrowExceptionOnMissingSerializationInformation Fallback Behavior
Throws an exception of type SerializationException if there is no matching PhpSerializationObjectInformation for a class.
UsePropertiesOnMissingSerializationInformation Fallback Behavior
Serializes classes by inspecting their properties and automatically converting them into php-properties. Optionally, if inspectPrivate is set to true, it will also inspect private properties. If inspectGetters is set to true, it will additionally inspect getters. Both options can be combined to also inspect private getters.